<<script type="text/javascript">
jQuery(function() {
    var exp_base_URL = '<?php echo Mapper::url('/lead/exportar/'); ?>';
    var exportarURL = '<?php echo Mapper::url('/lead/exportar/xls'); ?>';

    jQuery('[name=file_type]').click(function(e) {
        exportarURL = exp_base_URL+'/'+jQuery(this).val();
    });

    jQuery('#expSubmit').click(function(e) {
        e.preventDefault();

        jQuery('.modal').remove();
        window.location.href = exportarURL;
    });
});
</script>
<div id="popUp" class='modal' style="width: 550px; height:200px; border: 1px solid black;">
    <div class="content">
        <h1>Exportar Leads</h1>
        <form action="" method="post">
            <fieldset>
                <ul class="form">
                    <li>
                        <label for="">Formato</label>
                        <ul class="form hhh">
                            <li style="margin-right: 127px;">
                                <input type="radio" checked="checked" name="file_type" value="xls" />
                                <label class="csvIcon" for="">CSV</label>
                            </li>
                            <li>
                                <input type="radio" name="file_type" value="pdf" />
                                <label class="pdfIcon" for="">PDF</label>
                            </li>
                        </ul>
                    </li>
                </ul>
                <input type="button" class="botaoCinza right" value="Cancelar" onclick="{location.href='<?php echo Mapper::url('/lead');?>'}"/> 
                <input type="submit" id="expSubmit" class="botaoCinza right" value="Exportar"/>
            </fieldset>
        </form>
    </div>
</div>
<style type='text/css'>
.modal {
	position: absolute;
	top: 25%;
	left: 25%;
	z-index: 5000;
	background-color: #FFF;
}
</style>